home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Prog / M / LSC213.cpt / ControlMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-11-09  |  1.5 KB  |  86 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  ControlMgr.h
  4.  *
  5.  *  Copyright (c) 1986, 1987 THINK Technologies, Inc.
  6.  *  These interfaces are based on information copyrighted
  7.  *  by Apple Computer, Inc., 1985, 1986, 1987.
  8.  *
  9.  */
  10.  
  11. #ifndef    _ControlMgr_
  12. #define _ControlMgr_
  13.  
  14. #ifndef    _MacTypes_
  15. #include "MacTypes.h"
  16. #endif    
  17.  
  18. #ifndef    _WindowMgr_
  19. #include "WindowMgr.h"
  20. #endif
  21.  
  22. /* control messages */
  23. enum {
  24.     drawCntl,
  25.     testCntl,
  26.     calcCRgns,
  27.     initCntl,
  28.     dispCntl,
  29.     posCntl,
  30.     thumbCntl,
  31.     dragCntl,
  32.     autoTrack
  33. };
  34.  
  35. /* findcontrol result codes */
  36. enum {
  37.     inButton = 10,
  38.     inCheckBox = 11,
  39.     inUpButton = 20,
  40.     inDownButton = 21,
  41.     inPageUp = 22,
  42.     inPageDown = 23,
  43.     inThumb = 129
  44. };
  45.  
  46. /* control def proc id's */
  47. enum {
  48.     pushButProc,
  49.     checkBoxProc,
  50.     radioButProc,
  51.     useWFont = 8,
  52.     scrollBarProc = 16
  53. };
  54.  
  55. /*  Axis constraints for drag control  */
  56. /*    #define noConstraint    0    defined in WindowMgr.h    */
  57. /*    #define hAxisOnly        1    defined in WindowMgr.h    */
  58. /*    #define vAxisOnly        2    defined in WindowMgr.h    */
  59.  
  60.  
  61. typedef    struct    ControlRecord
  62.     {
  63.     struct ControlRecord **    nextControl ;
  64.     WindowPtr    contrlOwner ;
  65.     Rect        contrlRect ;
  66.     Byte        contrlVis ;
  67.     Byte        contrlHilite ;
  68.     int            contrlValue ;
  69.     int            contrlMin ;
  70.     int            contrlMax ;
  71.     Handle        contrlDefProc ;
  72.     Handle        contrlData ;
  73.     ProcPtr        contrlAction ; 
  74.     long        contrlRfCon ;
  75.     Str255        contrlTitle ;
  76.     } ControlRecord ;
  77. typedef ControlRecord * ControlPtr ;
  78. typedef ControlPtr *    ControlHandle ;
  79.  
  80.  
  81. /*  functions returning non-integral values  */
  82. pascal ControlHandle NewControl();
  83. pascal ControlHandle GetNewControl();
  84. pascal ProcPtr GetCtlAction();
  85.  
  86. #endif _ControlMgr_